﻿<!DOCTYPE html>

<html>
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/css/style.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/css/jquery-ui.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/css/jquery.ui.all.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.blockUI.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/Accordion.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.js")" type="text/javascript"></script>

    <script type="text/javascript">

        $(document).ready(function () {
            var idx;
            var firstAccordionUrls = [' ',
            '@MVC.Reports.Views.Deletes',
            '@MVC.Reports.Views.Moves',
            '@MVC.Reports.Views.OffHours',
            '@MVC.Reports.Views.Reads',
            '@MVC.Reports.Views.Renames',
            '@MVC.Reports.Views.Writes'];

            var secondAccordionUrls = ['@MVC.Statistics.Views.StorageHosts'];
            if (CheckCurrentPageInArray(firstAccordionUrls)) {
                idx = 1;
            }
            if (CheckCurrentPageInArray(secondAccordionUrls)) {
                idx = 2;
            }

            runAccordion(idx);
        });

        function CheckCurrentPageInArray(urls) {
            for (var i = 0; i < urls.length; i++) {
                var viewName = urls[i];
                var startIdx = viewName.lastIndexOf('/');
                var endIdx = viewName.lastIndexOf('.');
                viewName = viewName.substring(startIdx, endIdx);

                if (window.location.href.indexOf(viewName) != -1) {
                    return true;
                }
            }
            return false;
        }

    </script>
</head>
<body>
    <table width="958" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td class="header">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="menu_td">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td class="leftpane_spac">
                                        <table id="Table_" width="100%" height="31" border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td class="menutab_left">
                                                    &nbsp;
                                                </td>
                                                <td class="menutab_mid">
                                                    &nbsp;
                                                </td>
                                                <td class="menutab_right">
                                                    &nbsp;
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="leftpane_cont" style="border-bottom: none">
                                        <div id="AccordionContainer" class="AccordionContainer">
                                            <div onclick="runAccordion(1);">
                                                <div class="AccordionTitle" onselectstart="return false;">
                                                    Reports
                                                </div>
                                            </div>
                                            <div id="Accordion1Content" class="AccordionContent">
                                                @{ Html.RenderPartial(MVC.Shared.Views._MenuReports); }
                                            </div>

                                            <div onclick="runAccordion(2);">
                                                <div class="AccordionTitle" onselectstart="return false;">
                                                    Statistics
                                                </div>
                                            </div>
                                            <div id="Accordion2Content" class="AccordionContent">
                                                @{ Html.RenderPartial(MVC.Shared.Views._MenuStatistics); }
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="leftpane_spac">
                                        <table id="Table_2" width="100%" height="31" border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td class="menutab_left">
                                                    &nbsp;
                                                </td>
                                                <td class="menutab_mid">
                                                    Filter
                                                </td>
                                                <td class="menutab_right">
                                                    &nbsp;
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="leftpane_cont">
                                        @RenderSection("Filters", required: false)
                                        @RenderBody()
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td width="773" align="center" valign="top">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td>
                                        <table width="100%" height="30" border="0" cellpadding="0" cellspacing="0" id="Table_01">
                                            <tr>
                                                <td class="tab_header_left">
                                                    &nbsp;
                                                </td>
                                                <td class="tab_header_mid">@RenderSection("Header", required: false)
                                                </td>
                                                <td class="tab_header_right">
                                                    &nbsp;
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="content_side">@RenderSection("Body", required: false)
                                    </td>
                                </tr>
                                <tr>
                                    <td class="sep_padding">
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td class="footer_td">
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td width="12%">
                                                    <img alt="" src="../../Content/images/blocks.png" width="77" height="79" />
                                                </td>
                                                <td width="88%" class="footertext">
                                                    <img alt="" src="../../Content/images/NTPSoftwareLogo.png" width="109" height="56" /><br />
                                                    Copyright © 2012 by NTP Software. All rights reserved.
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</body>
</html>
